<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app"></div>
<script src="../../../JavaScript/vue.js"></script>
<script>
    // item组件
    const item = {
        template: `
          <div class="item">{{ message }}</div>`,
        data() {
            return {
                message: "我是局部的item组件"
            }
        }
    }
    // App根组件
    const App = {
        template: `
          <div class="App">
            <item v-for="(item,index) in 10" :key="index"></item>
         </div>
        `,
        components:{//局部注册
            item
        }
    }
    const app = Vue.createApp(App)
    app.mount("#app")
</script>
</body>
</html>
